[mirrors]
http://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.bz2

[vars]
filesize=17660960
sha512=01ad4b5a097efa70f74a9e96b764c32953a9df57d6bf81b893a1e552475f6aba0381580dcd1f27b2c443ce89fecc429eeeb0219af60a0b2f84798f76eb1757f5
desc="professional SQL database server and interface libraries"

[deps.host]
python

[deps]
openssl
libxml2
libxslt
readline
timezones

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir --with-system-tzdata="$butch_prefix"/etc/zoneinfo"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags \
  --enable-thread-safety \
  --docdir="$butch_prefix"/share/doc/postgresql \
  --mandir="$butch_prefix"/share/man
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

IS="$K"/bin/install-service
"$IS" --down --log --force postgres "$K"/services/postgres
